﻿@model IEnumerable<MvcApplication5.Models.Statistics>
  

@{
    ViewBag.Title = "Statistics";
    Layout = "~/Views/News/AdminLayout.cshtml";
}

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

<script>
    $(function () {
        $("#datepicker").datepicker({ dateFormat: "mm/dd/yy" });
    });
</script>

<h2>Thống kê</h2>
@using(Html.BeginForm("Statistics","News")){
<table border="1">
    <tr>
        <th><input type="checkbox" name="chkBox" id="chkBox" /></th>
        <th style="width:150px;">Chuyên mục</th>
        <th style="width:100px;">Số bài đã xuất bản</th>
        <th style="width:800px;">Lượt đọc</th>
    </tr>
    @foreach (var item in Model)
    {
        var ViewCount = (item.ViewCount * 10).ToString() + "px";
        <tr>
            <td><input type="checkbox" name="chkBox" id="chkBox1" value="@item.StatisticsId"/></td>
            <td>@item.Category.Name</td>
            <td>5</td>
            <td>
                <div class="viewcount-block" style="width:@ViewCount"><span class="viewcount-text">a</span></div>
                <div class="viewcount-number">@(item.ViewCount * 10)</div>
            </td>
        </tr>
    }
</table>
    <p>Thống kê ngày: @ViewBag.Date</p>
    <input id="datepicker" name="datepicker" />
    <input type="submit" value="Thống kê"/ style="float:right; margin-right:15px;"/>    
}
